package cn.wgx.module.sys.mapper;

import cn.wgx.common.base.IBaseMapper;
import cn.wgx.common.entity.ent.Enterprise;
import cn.wgx.common.entity.sys.SysApp;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Select;

public interface AppMapper extends IBaseMapper<SysApp> {

    @Select("select ee.* " +
            "from ent_enterprise ee " +
            "where ee.ent_id not in (select ent_id from ent_app where app_id = #{app_id}) and ee.top_pid=0")
    Page<Enterprise> listEntNotInApp(Page<Enterprise> page, Integer app_id);
}
